package edu.yctc.delivery.service;

import java.util.List;

import edu.yctc.delivery.entity.DeliveryDO;
import edu.yctc.delivery.entity.DeliveryPointDO;
import edu.yctc.delivery.entity.ResultDO;
import edu.yctc.delivery.entity.TruckDO;
import edu.yctc.delivery.vo.DeliveryVO;

/**
 * 元数据管理业务层接口
 * 
 *
 * @author 渠立庆
 */
public interface MetadataService {

    /**
     * 通过配送员姓名返回deliveryVO集
     * 
     * @param userName
     * @return
     */
    public ResultDO<List<DeliveryVO>> getDeliveryVOsByName(String userName);

    /**
     * 通过配送员的id返回deliveryVO集
     * 
     * @param id
     * @return
     */
    public ResultDO<List<DeliveryVO>> getDeliveryVOsByUserId(long id);

    /**
     * 根据用户的id删除一个或多个订单信息
     * 
     * @param userId
     * @return
     */
    public ResultDO<Void> deleteDeliveryDOsByUserId(long userId);

    /**
     * 根据用户的id和配送点的id删除单个订单
     * 
     * @param userId
     * @param deliveryPointId
     * @return
     */
    public ResultDO<Void> deleteDeliveryDOByUserIdAndDeliveryPointId(long userId, long deliveryPointId);

    /**
     * 插入配送订单信息
     * 
     * @param deliveryVOs
     * @return
     */
    public ResultDO<Void> insertDeliveryDOs(List<DeliveryVO> deliveryVOs);

    /**
     * 获取所有DeliveryDO
     * 
     * @param
     * @return
     */
    public ResultDO<List<DeliveryDO>> getAllDeliveryDOs();

    /**
     * 通过配送员姓名得到所有配送信息
     * 
     * @param username
     * @return
     */
    public ResultDO<List<DeliveryDO>> getDeliveryDOByUserName(String username);

    /**
     * 通过deliveryDO返回deliveryVO
     * 
     * @param bookDO
     * @return
     */
    public ResultDO<DeliveryVO> getDeliveryVOByDeliveryDO(DeliveryDO deliveryDO);

    /**
     * 录入配送点信息
     * 
     * @param deliveryPointDO
     * @return
     */
    public ResultDO<Void> insertDeliveryPointDO(DeliveryPointDO deliveryPointDO);

    /**
     * 删除配送点
     * 
     * @param deliveryPointId
     * @return
     */
    public ResultDO<Void> deleteDeliveryPointDO(long deliveryPointId);

    /**
     * 修改配送点的信息
     * 
     * @param deliveryPointDO
     * @return
     */
    public ResultDO<Void> updateDeliveryPointDO(DeliveryPointDO deliveryPointDO);

    /**
     * 根据配送点的id返回配送点的详细信息
     * 
     * @param deliveryPointId
     * @return
     */
    public ResultDO<DeliveryPointDO> getDeliveryPointDOById(long deliveryPointId);

    /**
     * 录入车辆信息
     * 
     * @param truckDO
     * @return
     */
    public ResultDO<Void> insertTruckDO(TruckDO truckDO);

    /**
     * 删除车辆
     * 
     * @param truckId
     * @return
     */
    public ResultDO<Void> deleteTruckDO(long truckId);

    /**
     * 修改车辆信息
     * 
     * @param truckDO
     * @return
     */
    public ResultDO<Void> updateTruckDO(TruckDO truckDO);

    /**
     * 
     * 根据货车的id返回TruckDO
     * 
     * @param truckId
     * @return
     */
    public ResultDO<TruckDO> getTruckDOById(long truckId);
}
